<template>
	<view class="page">
		<view
			class="flex flex-direction flex-wrap align-stretch justify-center benben-position-layout flex changePassword_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between changePassword_fd0_0'>
				<view class='flex flex-wrap align-center changePassword_fd0_0_c0' @tap.stop="handleJumpDiy"
					data-type="back" data-url="1">
					<text class='fu-iconfont2  testExamination_fd0_0_c0_c0'>&#xE794;</text>
				</view>
				<text class='changePassword_fd0_0_c1'>添加会员</text>
				<view class='flex align-center justify-end changePassword_fd0_0_c2'>
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		
		<!-- <view class="press">
			<view class="press_le press_line_active"></view>
			<view class="press_ce"></view>
			<view class="press_ri"></view>
		</view>
		<view class="press_text">
			<view class="press_text_1 press_active">手机号验证</view>
			<view class="press_text_1">新手机号验证</view>
		</view> -->
		<view class="input_content">
			<view class="content_item">
				<view class="content_item_label">手机号</view>
				<input class='flex-sub personalInformation_fd1_1_c1' type="text" placeholder="请输入手机号" confirm-type="done"
					:maxlength="11" placeholder-style="color:rgba(102, 102, 102, 1);font-size:30rpx" :disabled="false"
					v-model="phone" />
			</view>
			<!-- <view class="content_item">
				<view class="content_item_label">验证码</view>
				<input class='flex-sub personalInformation_fd1_1_c1' type="text" placeholder="请输入验证码" confirm-type="done" :maxlength="14" placeholder-style="color:rgba(102, 102, 102, 1);font-size:30rpx" v-model="code" />
				<benben-send-verification-code class='flex  changePassword_fd3_0' after-text='后重新获取' before-text='获取验证码' type='2' :phone="phone"></benben-send-verification-code>
			</view> -->
		</view>
		
		<!-- <view class="input_content">
			<view class="content_item">
				<view class="content_item_label">新手机号</view>
				<input class='flex-sub personalInformation_fd1_1_c1' type="text" placeholder="请输入新手机号" confirm-type="done"
					:maxlength="14" placeholder-style="color:rgba(102, 102, 102, 1);font-size:30rpx" :disabled="true"
					v-model="phone" />
			</view>
			<view class="content_item">
				<view class="content_item_label">验证码</view>
				<input class='flex-sub personalInformation_fd1_1_c1' type="text" placeholder="请输入验证码" confirm-type="done"
					:maxlength="14" placeholder-style="color:rgba(102, 102, 102, 1);font-size:30rpx" v-model="code" />
				<benben-send-verification-code class='flex  changePassword_fd3_0' after-text='后重新获取' before-text='获取验证码'
						type='2' :phone="userInfo.all_mobile"></benben-send-verification-code>
			</view>
		</view> -->
		
		<!-- <button class='changePassword_fd3_1' @tap.stop="getjump()">保存</button> -->
		
		<view class="flex align-center justify-between feedback_flex_4" @tap.stop="addNext">
			<view class='feedback_fd4_0'>添加</view>
		</view>

	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},

		data() {
			return {
				"fd3_0": "mobile",
				"code": "",
				"name": "",
				"phone": ""
			};
		},
		computed: {
			userInfo: {
				get() {
					return this.$store.state.userInfo
				},
				set() {
					this.$store.commit('updateUserInfo', value)
				},
			}
		},
		watch: {},
		onLoad(options) {
			
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//跳转
			addNext() {
				// if (!validate(this.code, 'require')) {
				// 	this.$message.info('请输入验证码');
				// 	return false;
				// }
				if (!this.phone) {
					this.$message.info('请输入手机号');
					return;
				}
				if (!validate(this.phone, 'phone')) {
					this.$message.info('请输入正确的手机号');
					return false;
				}
				uni.showLoading({
					title: '加载中'
				})
				this.$api.post(global.apiUrls.addUser, {
					phone_no: this.phone,
					customer_id: global.userInfo.customer_id
				}).then(result => {
					// console.log("后台返回登录信息", result);
					uni.hideLoading();
					this.$message.info(result.data.info);
					if (result.data.code == 1) {
						setTimeout(() => {
							uni.redirectTo({
								url: '/pages/index/selectVehicle/selectVehicle?user_id=' + result.data.data.user_id
							})
						}, 800)
					}
				}).catch(err => {
					uni.hideLoading();
					this.$message.info(err.info);
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.press {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 44rpx 80rpx 16rpx 76rpx;
		.press_le {
			width: 20rpx;
			height: 20rpx;
			background: #E7E7E7;
			border-radius: 50%;
		}
		.press_ce {
			// width: 580rpx;
			flex: 1;
			height: 4rpx;
			background: #E7E7E7;
		}
		.press_ri {
			width: 20rpx;
			height: 20rpx;
			background: #E7E7E7;
			border-radius: 50%;
		}
		.press_line_active {
			background: #1A66FA;
		}
	}
	.press_text {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 32rpx;
		.press_text_1 {
			font-weight: 400;
			font-size: 22rpx;
			color: #999999;
		}
		.press_active {
			color: #1A66FA;
		}
	}
	.input_content {
		margin: 32rpx;
		background: #fff;
		border-radius: 16rpx;
		padding: 32rpx 24rpx;
		.content_item {
			padding: 24rpx 20rpx;
			background: #f7f7f7;
			display: flex;
			align-items: center;
			.content_item_label {
				width: 120rpx;
				font-weight: 400;
				font-size: 30rpx;
				color: #666666;
			}
		}
	}
	.personalInformation_fd1_1_c1 {
		font-size: 30rpx;
		font-weight: 500;
		color: #111;
		text-align: left;
		padding: 0 24rpx;
	}
	
	
	.changePassword_fd3_0 {
		font-weight: 400;
		font-size: 30rpx;
		color: #1A66FA;
		text-align: center;
		line-height: 40rpx;
	}

	.changePassword_fd3_1 {
		background: #1A66FA;
		border-radius: 16rpx;
		font-size: 30rpx;
		font-weight: bold;
		color: #fff;
		margin: 64rpx auto 0;
		height: 96rpx;
		line-height: 96rpx;
		width: 640rpx;
	}
	
	.feedback_fd4_0 {
		width: 640rpx;
		border-radius: 16rpx;
		font-size: 30rpx;
		font-weight: bold;
		color: #fff;
		margin: 0rpx 32rpx 0rpx 32rpx;
		height: 96rpx;
		line-height: 96rpx;
		text-align: center;
		background: #1A66FA;
	}
	
	.feedback_flex_4 {
		width: 750rpx;
		height: 120rpx;
		overflow: hidden;
		position: fixed;
		z-index: 10;
		bottom: calc(0rpx + var(--window-bottom));
		display: flex;
		justify-content: center;
		background: #fff;
	}
	
	
	

	.changePassword_flex_3 {
		margin: 40rpx 0rpx 0rpx 0rpx;
	}

	.changePassword_flex_password_active_2 {
		border: 1px solid rgba(217, 217, 217, 1);
		width: 101rpx;
		height: 86rpx;
	}

	.changePassword_flex_password_noActive_2 {
		border: 1px solid rgba(217, 217, 217, 1);
		width: 101rpx;
		height: 86rpx;
	}

	.changePassword_fd1_0 {
		font-size: 28rpx;
		font-weight: 400;
		color: #333333;
		line-height: 40rpx;
	}

	.changePassword_fd1_1 {
		margin: 55rpx 0rpx 72rpx 0rpx;
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333333;
	}

	.changePassword_flex_1 {
		padding: 103rpx 0rpx 0rpx 0rpx;
	}

	.changePassword_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.changePassword_fd0_0_c0 {
		width: 40rpx;
		height: 40rpx;
	}

	.changePassword_fd0_0_c0_c0 {
		width: 18rpx;
		height: 32rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}
	.testExamination_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #111;
	}

	.changePassword_fd0_0_c1 {
		font-size: 32rpx;
		font-weight: bold;
		color: #111111;
	}

	.changePassword_fd0_0_c2 {
		width: 40rpx;
		height: 40rpx;
	}

	.changePassword_flex_0 {
		background: url(https://speed.zhongchuxing.com/gjdimages/page_bg.png) no-repeat;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.page {
		min-height: calc(100vh - var(--window-bottom));
		background: url(https://speed.zhongchuxing.com/gjdimages/page_bg.png) no-repeat #f6f7fb;
		background-size: 100% auto !important;
	}
</style>
